﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>页面重定向</title>
    <script type="text/javascript" src="../Content/highlighter/scripts/shCore.js"></script>
    <script type="text/javascript" src="../Content/highlighter/scripts/shBrushCSharp.js"></script>
    <script type="text/javascript" src="../Content/highlighter/scripts/shBrushXml.js"></script>
    <link type="text/css" rel="stylesheet" href="../Content/highlighter/styles/shCoreDefault.css"/>
    <script type="text/javascript">SyntaxHighlighter.all();</script>
</head>
<body>
    <h3>页面压缩及页面缓存</h3>
    <p>
        页面压缩
    </p>
    <pre class="brush: csharp;">
		//引入命名空间:using NFinal.Advanced;
		//在控制器函数中加入以下特性,将自动实现压缩功能.
        [Action(Result.HTMLZip)]
		public void Index()
		{
			Write("Hello!");
		}
    </pre>
    <p>
        页面缓存
    </p>
	<pre class="brush: csharp;">
		//引入命名空间:using NFinal.Advanced;
		//在控制器函数中加入以下特性,将自动实现缓存功能.
        [Cache(Standard.File,60)]
		public void Index()
		{
			Write("Hello!");
		}
    </pre>
	<p>
	Cache(Standard.File);//系统将在HTML目录下生成静态页进行缓存.<br>
	Cache(Standard.Time,60);//超过60秒系统将重新缓存.
	</p>
</body>
</html>
